import request from '@/utils/request'
// 区域列表
export const regionList = data => request.get('/vm-service/region/search', {
  params: data
})
// 新增区域
export const addRegion = data => request.post('/vm-service/region', data)
// 删除区域
export const delRegion = id => request.delete(`/vm-service/region/${id}`)
// 查看区域
export const viewRegion = data => request.get('/vm-service/node/search/', {
  params: data
})
// 修改区域
export const editRegion = data => request.put(`/vm-service/region/${data.id}`, data)

// 点位
// 点位列表
export const nodeList = data => request.get('/vm-service/node/search', {
  params: data
})
// 新增点位
export const addNode = data => request.post('http://likede2-admin.itheima.net/likede/api/vm-service/node', data)
// 删除点位
export const delNode = id => request.delete(`/vm-service/node/${id}`)
// 查看点位
export const viewNode = id => request.get(`/vm-service/node/vmList/${id}`)
// 修改点位
export const editNode = data => request.put(`/vm-service/node/${data.id}`, data)
// 弹框-所属区域
export const inRegion = data => request.get('http://likede2-admin.itheima.net/likede/api/vm-service/region/search', {
  params: data
})
// 弹框-所属商圈
export const inBusiness = () => request.get('http://likede2-admin.itheima.net/likede/api/vm-service/businessType')
// 弹框-所属合作商
export const inPartner = data => request.get('http://likede2-admin.itheima.net/likede/api/user-service/partner/search', {
  params: data
})
// 合作商
// 合作商列表
export const partnerList = data => request.get('/user-service/partner/search', {
  params: data
})
// 重置合作商密码
export const resetPwd = id => request.put(`http://likede2-admin.itheima.net/likede/api/user-service/partner/resetPwd/${id}`)
// 删除合作商
export const delPartner = id => request.delete(`http://likede2-admin.itheima.net/likede/api/user-service/partner/${id}`)
// 新增合作商
export const addPartner = data => request.post('http://likede2-admin.itheima.net/likede/api/user-service/partner', data)
// 修改合作商
export const editPartner = data => request.put(`http://likede2-admin.itheima.net/likede/api/user-service/partner/${data.id}`, data)
